import {cateData} from '@/api/category'
Page({
  data:{
    list: [],
    activeIndex: 0
  },
  async getData(){
    const {data} = await cateData()
    this.setData({list: data})
  },
  onLoad(){
    this.getData()
  },
  onecate(e){
    this.setData({activeIndex: e.target.dataset.index})
  }
})
